package edu.hunau.cxb19.oop.class05.hk;

/**
 *
 * @author hb
 *
 *         2020-02-28 15:11:35
 */
public class Question {
	
	private int id;// 编号
	private String[] options;// 选项
	private String text;

	/**
	 * 
	 */
	public Question() {
		super();

	}

	/**
	 * 向控制台打印题目内容
	 * 
	 * 1. 中国四大名著 A . 红楼梦 B . 西游记 C . Java核心技术 D . 水浒传
	 */
	public void print() {
		System.out.println(id + "." + text);
		for (int i = 0; i < options.length; i++) {
			System.out.println((char) ('A' + i) + "." + options[i]);
		}
		System.out.println();
	}

	public boolean check(char[] answers) {
		return false;
	}

	public Question(int id, String[] options, String text) {
		super();
		this.id = id;
		this.options = options;
		this.text = text;
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the options
	 */
	public String[] getOptions() {
		return options;
	}

	/**
	 * @param options the options to set
	 */
	public void setOptions(String[] options) {
		this.options = options;
	}

	/**
	 * @return the text
	 */
	public String getText() {
		return text;
	}

	/**
	 * @param text the text to set
	 */
	public void setText(String text) {
		this.text = text;
	}

}
